<template>
  <div class="top">
    <div class="statistics">
      <ul>
        <li v-for="(item,id) in option"
            :key="id">
          <div class="num">
            <span :style="item.color">{{item.dataValue}}</span><span :style="item.color">{{item.unit}}</span>
          </div>
          <div class="text">{{item.dataName}}</div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      // list: [
      //   { id: 1, num: '20', unit: '万吨', text: '近一年采购总量', color: 'color:#64B7EC' },
      //   { id: 2, num: '20', unit: '万吨', text: '近一年采购总量', color: 'color:#F56E6A' },
      //   { id: 3, num: '20', unit: '万吨', text: '近一年采购总量', color: 'color:#F69E0D' },
      //   { id: 4, num: '20', unit: '万吨', text: '近一年采购总量', color: 'color:#6EC71E' },
      // ]
    }
  },
  props: {
    option: {
      type: Array,
      default: () => ({})
    }
  },
  methods: {

  },
  created () {
    console.log(this.option);
  },
}
</script>

<style scoped>
.top {
  padding: 0.25rem 0 0.625rem 0;
}
.top h6 {
  padding-left: 0.25rem;
  font-size: .225rem;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #333333;
}
.statistics {
  padding-top: 0.45rem;
}
.statistics ul {
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
}
.statistics ul li .text {
  font-size: 0.175rem;
  font-family: Source Han Sans CN;
  font-weight: 400;
  color: #666666;
}
.num span:nth-child(1) {
  font-size: 0.4rem;
  font-family: Arial;
  font-weight: bold;
}
.num span:nth-child(2) {
  font-size: 0.225rem;
  font-family: Source Han Sans CN;
  font-weight: 400;
}
</style>
